﻿"use strict";
import * as electron from 'electron'
var app = electron.app
var BrowserWindow = electron.BrowserWindow
var ipc = electron.ipcMain
var mainWindow = null

app.on('window-all-closed', function () {
    if (process.platform != 'darwin') {
        app.quit();
    }
});
app.on('ready', function () {
    mainWindow = new BrowserWindow({
        transparent: true,
        frame: false,
        resizable: false,
        width: 370,
        height: 280
    });
    mainWindow.center();
    mainWindow.loadURL('file://' + __dirname + '/窗体/窗体页面/登录页面.html');
    mainWindow.on('closed', function () {
        mainWindow = null;
    });
    ipc.on('托盘窗口', function () {
        mainWindow.minimize();
    });
    ipc.on('关闭窗口', function () {
        app.quit();
    });
});